package com.ruoyi.yanjing.constant;

public class UserConstant {
	
	public static enum USER_TYPE {
		ADMIN("企业管理员"), PAYMENT("财务会员"), USER("普通会员");
		private String cnName;

		USER_TYPE(String name) {
			this.cnName = name;
		}

		public String getCode() {
			return this.name();
		}

		public String getCnName() {
			return this.cnName;
		}

		public static String getCnName(String code) {
			for (USER_TYPE item : USER_TYPE.values()) {
				if (item.getCode().equals(code)) {
					return item.getCnName();
				}
			}
			return code;
		}

		public String toString() {
			return this.name();
		}
	}

	public static enum USER_SEX_TYPE {
		MALE("男"), FEMALE("女");
		private String cnName;

		USER_SEX_TYPE(String name) {
			this.cnName = name;
		}

		public String getCode() {
			return this.name();
		}

		public String getCnName() {
			return this.cnName;
		}

		public static String getCnName(String code) {
			for (USER_SEX_TYPE item : USER_SEX_TYPE.values()) {
				if (item.getCode().equals(code)) {
					return item.getCnName();
				}
			}
			return code;
		}

		public String toString() {
			return this.name();
		}
	}
	
	
	public static enum USER_CHANNEL {
		WX("微信小程序");
		private String cnName;

		USER_CHANNEL(String name) {
			this.cnName = name;
		}

		public String getCode() {
			return this.name();
		}

		public String getCnName() {
			return this.cnName;
		}

		public static String getCnName(String code) {
			for (USER_CHANNEL item : USER_CHANNEL.values()) {
				if (item.getCode().equals(code)) {
					return item.getCnName();
				}
			}
			return code;
		}

		public String toString() {
			return this.name();
		}
	}

	public static enum USER_FAVOR_OBJECT {
		COMPANY("企业"), PRODUCT("活动");
		private String cnName;

		USER_FAVOR_OBJECT(String name) {
			this.cnName = name;
		}

		public String getCode() {
			return this.name();
		}

		public String getCnName() {
			return this.cnName;
		}

		public static String getCnName(String code) {
			for (USER_FAVOR_OBJECT item : USER_FAVOR_OBJECT.values()) {
				if (item.getCode().equals(code)) {
					return item.getCnName();
				}
			}
			return code;
		}

		public String toString() {
			return this.name();
		}
	}

	public static enum USER_COMMENT_OBJECT {
		COMPANY("企业"), PRODUCT("活动");
		private String cnName;

		USER_COMMENT_OBJECT(String name) {
			this.cnName = name;
		}

		public String getCode() {
			return this.name();
		}

		public String getCnName() {
			return this.cnName;
		}

		public static String getCnName(String code) {
			for (USER_COMMENT_OBJECT item : USER_COMMENT_OBJECT.values()) {
				if (item.getCode().equals(code)) {
					return item.getCnName();
				}
			}
			return code;
		}

		public String toString() {
			return this.name();
		}
	}

	public static enum USER_REGISTER_TYPE {
		MOBLIE("手机注册"), EMAIL("邮箱注册"), WX("微信注册");
		private String cnName;

		USER_REGISTER_TYPE(String name) {
			this.cnName = name;
		}

		public String getCode() {
			return this.name();
		}

		public String getCnName() {
			return this.cnName;
		}

		public static String getCnName(String code) {
			for (USER_REGISTER_TYPE item : USER_REGISTER_TYPE.values()) {
				if (item.getCode().equals(code)) {
					return item.getCnName();
				}
			}
			return code;
		}

		public String toString() {
			return this.name();
		}
	}

	public static enum USER_STATUS {
		NORMAL("正常"), NOTACTIVE("未激活"), CANCEL("停用"), FINISH("完成"), FRZE("冻结");
		private String cnName;

		USER_STATUS(String name) {
			this.cnName = name;
		}

		public String getCode() {
			return this.name();
		}

		public String getCnName() {
			return this.cnName;
		}

		public static String getCnName(String code) {
			for (USER_STATUS item : USER_STATUS.values()) {
				if (item.getCode().equals(code)) {
					return item.getCnName();
				}
			}
			return code;
		}

		public String toString() {
			return this.name();
		}
	}

	public static enum COMMON_TYPE {
		TRUE("默认"), FALSE("未默认");
		private String cnName;

		COMMON_TYPE(String name) {
			this.cnName = name;
		}

		public String getCode() {
			return this.name();
		}

		public String getCnName() {
			return this.cnName;
		}

		public static String getCnName(String code) {
			for (COMMON_TYPE item : COMMON_TYPE.values()) {
				if (item.getCode().equals(code)) {
					return item.getCnName();
				}
			}
			return code;
		}

		public String toString() {
			return this.name();
		}
	}

	public static enum BIND_STATUS {
		NOTBOUND("未绑定"), BOUND("已绑定"), UNBOUND("已解绑");
		private String cnName;

		BIND_STATUS(String name) {
			this.cnName = name;
		}

		public String getCode() {
			return this.name();
		}

		public String getCnName() {
			return this.cnName;
		}

		public static String getCnName(String code) {
			for (BIND_STATUS item : BIND_STATUS.values()) {
				if (item.getCode().equals(code)) {
					return item.getCnName();
				}
			}
			return code;
		}

		public String toString() {
			return this.name();
		}
	}

	public static enum RECHARGE_STATUS {
		CREATE("新建充值"), CANCEL("取消充值"), PASS("审核通过"), HANDING("交易处理中"), UNPASS("审核不通过"), SUCCESS("充值成功"), PART_SUCCESS("充值部分成功"), FAIL("充值失败");
		private String cnName;

		RECHARGE_STATUS(String name) {
			this.cnName = name;
		}

		public String getCode() {
			return this.name();
		}

		public String getCnName() {
			return this.cnName;
		}

		public static String getCnName(String code) {
			for (RECHARGE_STATUS item : RECHARGE_STATUS.values()) {
				if (item.getCode().equals(code)) {
					return item.getCnName();
				}
			}
			return code;
		}

		public String toString() {
			return this.name();
		}
	}

	public static enum RECHARGE_TYPE {
		ONLINE("在线充值"), OFFLINE("线下充值");
		private String cnName;

		RECHARGE_TYPE(String name) {
			this.cnName = name;
		}

		public String getCode() {
			return this.name();
		}

		public String getCnName() {
			return this.cnName;
		}

		public static String getCnName(String code) {
			for (RECHARGE_TYPE item : RECHARGE_TYPE.values()) {
				if (item.getCode().equals(code)) {
					return item.getCnName();
				}
			}
			return code;
		}

		public String toString() {
			return this.name();
		}
	}

	public static enum DRAW_TYPE {
		ONLINE("在线提现"), OFFLINE("线下提现");
		private String cnName;

		DRAW_TYPE(String name) {
			this.cnName = name;
		}

		public String getCode() {
			return this.name();
		}

		public String getCnName() {
			return this.cnName;
		}

		public static String getCnName(String code) {
			for (DRAW_TYPE item : DRAW_TYPE.values()) {
				if (item.getCode().equals(code)) {
					return item.getCnName();
				}
			}
			return code;
		}

		public static String getCode(String cnName) {
			for (DRAW_TYPE item : DRAW_TYPE.values()) {
				if (item.getCnName().equalsIgnoreCase(cnName)) {
					return item.getCode();
				}
			}
			return cnName;
		}

		public String toString() {
			return this.name();
		}
	}

	public static enum DRAW_STATUS {
		CREATE("待处理"), CANCEL("已取消"), PASS("审核通过"), HANDING("交易处理中"), UNPASS("审核不通过"), SUCCESS("提现成功"), PART_SUCCESS("提现部分成功"), FAIL("提现失败");
		private String cnName;

		DRAW_STATUS(String name) {
			this.cnName = name;
		}

		public String getCode() {
			return this.name();
		}

		public String getCnName() {
			return this.cnName;
		}

		public static String getCnName(String code) {
			for (DRAW_STATUS item : DRAW_STATUS.values()) {
				if (item.getCode().equals(code)) {
					return item.getCnName();
				}
			}
			return code;
		}

		public static String getCode(String cnName) {
			for (DRAW_STATUS item : DRAW_STATUS.values()) {
				if (item.getCnName().equalsIgnoreCase(cnName)) {
					return item.getCode();
				}
			}
			return cnName;
		}

		public String toString() {
			return this.name();
		}
	}

	public static enum REFUND_STATUS {
		CREATE("新建退款"), CANCEL("取消退款"), SUCCESS("退款成功"), FAIL("退款失败");
		private String cnName;

		REFUND_STATUS(String name) {
			this.cnName = name;
		}

		public String getCode() {
			return this.name();
		}

		public String getCnName() {
			return this.cnName;
		}

		public static String getCnName(String code) {
			for (REFUND_STATUS item : REFUND_STATUS.values()) {
				if (item.getCode().equals(code)) {
					return item.getCnName();
				}
			}
			return code;
		}

		public static String getCode(String cnName) {
			for (REFUND_STATUS item : REFUND_STATUS.values()) {
				if (item.getCnName().equalsIgnoreCase(cnName)) {
					return item.getCode();
				}
			}
			return cnName;
		}

		public String toString() {
			return this.name();
		}
	}

	public static enum REVENUE_STATUS {
		CREATE("新建"), CANCEL("取消"), PASS("审核通过"), UNPASS("审核不通过"), SUCCESS("完成"), FAIL("失败");
		private String cnName;

		REVENUE_STATUS(String name) {
			this.cnName = name;
		}

		public String getCode() {
			return this.name();
		}

		public String getCnName() {
			return this.cnName;
		}

		public static String getCnName(String code) {
			for (REVENUE_STATUS item : REVENUE_STATUS.values()) {
				if (item.getCode().equals(code)) {
					return item.getCnName();
				}
			}
			return code;
		}

		public static String getCode(String cnName) {
			for (REVENUE_STATUS item : REVENUE_STATUS.values()) {
				if (item.getCnName().equalsIgnoreCase(cnName)) {
					return item.getCode();
				}
			}
			return cnName;
		}

		public String toString() {
			return this.name();
		}
	}

	public static enum REVENUE_TYPE {
		IN("收入"), OUT("支出");
		private String cnName;

		REVENUE_TYPE(String name) {
			this.cnName = name;
		}

		public String getCode() {
			return this.name();
		}

		public String getCnName() {
			return this.cnName;
		}

		public static String getCnName(String code) {
			for (REVENUE_TYPE item : REVENUE_TYPE.values()) {
				if (item.getCode().equals(code)) {
					return item.getCnName();
				}
			}
			return code;
		}

		public static String getCode(String cnName) {
			for (REVENUE_TYPE item : REVENUE_TYPE.values()) {
				if (item.getCnName().equalsIgnoreCase(cnName)) {
					return item.getCode();
				}
			}
			return cnName;
		}

		public String toString() {
			return this.name();
		}
	}

}
